-
-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/v10.x #51
base: main
Are you sure you want to change the base?
Fix/v10.x #51
Conversation
@NayThuKhant Great job. Problem with the PR is that dispatchSync will always perform the job/feature synchronously. One of the Lucid features is that jobs/features can be dispatched for delayed/async processing. |
I think we can still use runInQueue if only we want to run a job synchronously, isn't it? public function runInQueue($unit, array $arguments = [], $queue = 'default')
{
// instantiate and queue the unit
$reflection = new ReflectionClass($unit);
$instance = $reflection->newInstanceArgs($arguments);
$instance->onQueue((string)$queue);
return $this->dispatch($instance);
} |
Hello again, |
@NayThuKhant We're running into a similar issue with the (https://github.com/ksimenic/lucid) fork because of the We use separate queues that are configured in the global queue configuration, thus resulting in jobs being sent to the wrong queue. (basically any queue that is named different than default will go wrong) In the old situation, they would be dispatched to the correct queue (as configured in the laravel queue config) |
In Laravel 10.x, the flow of dispatch helper function changed a bit and lucid wont be working on it anymore. To solve it, let me create this PR.
will now be using dispatchSync() not the dispatch() that lucid used previously.